package net.sql.i;

import net.sql.SqlConnector;
import net.sql.config.SQLBean;

/**
 * @author 李岩飞
 * @email eliyanfei@126.com
 * @date 2018年7月25日下午5:25:57
 */
public class ErrorListener implements ISqlListener {

	private IPrintError printError;

	public ErrorListener(IPrintError printError) {
		this.printError = printError;
	}

	@Override
	public void beforeListener(SQLBean sqlBean) {
	}

	@Override
	public void afterListener(SQLBean sqlBean, SqlConnector connector, long useTime) {
	}

	public void printError(Throwable e, String sql) {
		printError.printError(e, sql);
	}
}
